package com.zsyg.common.freemarker.puls;

/**
 * @author YangWanLi
 * @date 2018/8/15 0:10
 */
public class GeneratorEntity {

    // 作者
    private String author = "YangWanLi";

    // 数据库驱动
    private String driverName = "com.mysql.jdbc.Driver";

    // 数据库账号
    private String username = "root";

    // 数据库密码
    private String password = "root";

    // 数据库url
    private String url = "jdbc:mysql://192.168.1.102/test?characterEncoding=utf8";

    // 自定义 mapper 父类
    private String superMapperClass ="com.zsyg.common.base.BaseMapper";

    // 自定义 service 父类
    private String superServiceClass = "com.zsyg.common.base.BaseService";

    // 自定义 service 实现类父类
    private String superServiceImplClass = "com.zsyg.common.base.BaseServiceImpl";

    // 自定义 controller 父类
    private String superControllerClass = "com.zsyg.common.base.BaseController";

    // 生成的模块名
    private String moduleName = "test";

    // 文件输出位置
    private String outputDir = "src\\main\\java";

    // 根据表的前缀生成
    private String tablePrefix;

    // 需要生成的表
    private String tableInclude;

    // 排除生成的表
    private String tableExclude;

    public String getOutputDir() {
        return outputDir;
    }

    public void setOutputDir(String outputDir) {
        this.outputDir = outputDir;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getSuperMapperClass() {
        return superMapperClass;
    }

    public void setSuperMapperClass(String superMapperClass) {
        this.superMapperClass = superMapperClass;
    }

    public String getSuperServiceClass() {
        return superServiceClass;
    }

    public void setSuperServiceClass(String superServiceClass) {
        this.superServiceClass = superServiceClass;
    }

    public String getSuperServiceImplClass() {
        return superServiceImplClass;
    }

    public void setSuperServiceImplClass(String superServiceImplClass) {
        this.superServiceImplClass = superServiceImplClass;
    }

    public String getSuperControllerClass() {
        return superControllerClass;
    }

    public void setSuperControllerClass(String superControllerClass) {
        this.superControllerClass = superControllerClass;
    }

    public String getModuleName() {
        return moduleName;
    }

    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    public String getTablePrefix() {
        return tablePrefix;
    }

    public void setTablePrefix(String tablePrefix) {
        this.tablePrefix = tablePrefix;
    }

    public String getTableInclude() {
        return tableInclude;
    }

    public void setTableInclude(String tableInclude) {
        this.tableInclude = tableInclude;
    }

    public String getTableExclude() {
        return tableExclude;
    }

    public void setTableExclude(String tableExclude) {
        this.tableExclude = tableExclude;
    }

    public String [] getTableExcludeArr(){
        return this.tableExclude == null ? null : this.tableExclude.split(",");
    }

    public String [] getTableIncludeArr(){
        return this.tableInclude == null ? null : this.tableInclude.split(",");
    }

    public String [] getTablePrefixArr(){
        return this.tablePrefix == null ? null : this.tablePrefix.split(",");
    }
}
